function cmdSuccess(data, status, req) {
	for(key in data) {
		dataHandler(key, data[key]);
	}
}

function cmd(cmd, args){
	$.post('query.php', {cmd: cmd, data: args}, cmdSuccess, 'JSON');
}